<template>
	<view>
		<view class="list">
			<view class="item bg-white fbox fbox-acenter" v-for="(item,index) in list" @click="click(item.id)">
				<image src="" mode="widthFix"></image>
				<text>{{item.title}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: []
			}
		},
		onLoad() {
			this.init()
		},
		methods: {
			init() {
				const params = {
					map: 'applet_mobile_category_list'
				}
				this.$Request({
					method: 'GET',
					data: params
				}).then(res => {
					if (res.data.ec == 200) {
						this.list = res.data.data
					} else {}
				})
			},
			click(id) {
				uni.navigateTo({
					url: '/pages/searchbox/index?id=' + id + '&name=' + 'telBook'
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #f4f5f6;
		font-size: 30rpx;
		color: #333333;
		border-top: 1px solid #f4f5f6;
	}

	.list {
		.item {
			margin: 20rpx 30rpx 0;
			border-radius: 50rpx;
			padding: 26rpx 0 26rpx 100rpx;

			image {
				width: 40rpx;
				height: 40rpx;
				margin-right: 20rpx;
				background-color: #8bc7ff;
				border-radius: 10rpx;
				opacity: 0.6;
			}
		}
	}
</style>
